package main

import "fmt"

func main() {
	var word string

	for {
		n, _ := fmt.Scan(&word)
		if n == 0 {
			return
		}

		var j int
		for i := 0; i < len(word); i++ {
			if word[i] >= '1' && word[i] <= '3' {
				j = i + 1
				for ; j < len(word) && word[j] >= '0' && word[j] <= '9'; j++ {
				}
				if j-i == 4 {
					fmt.Printf("%s ", word[i:j])
				}
				i = j - 2
			}
		}
	}
}
